<template>
  <div>
    <van-search background="#4fc08d" placeholder="请输入小区或地址" show-action>
      <template #left>
        <div class="icone">
          <van-icon name="arrow-left" color="#fff" />
        </div>
      </template>
      <template #label>
        <div @click="fn">上海▼</div>
      </template>
      <template #action>
        <van-icon name="location-o" size="20px" @click="$router.push('/map')" />
      </template>
    </van-search>
    <!-- 选择内容 -->
    <van-sticky>
      <van-dropdown-menu>
        <van-dropdown-item title="区域"><van-picker /></van-dropdown-item>
        <van-dropdown-item title="方式"><van-picker /></van-dropdown-item>
        <van-dropdown-item title="租金"><van-picker /></van-dropdown-item>
        <van-dropdown-item title="筛选"><van-picker /></van-dropdown-item>
      </van-dropdown-menu>
    </van-sticky>
  </div>
</template>

<script>
import { getFind } from '@/api/find'
export default {
  data() {
    return {
      query: { id: 'AREA|88cff55c-aaa4-e2e0' },
      columns: [],
      columns1: [],
      columns2: [],
      label: []
    }
  },
  methods: {
    fn() {
      this.$router.push('/citylist')
    }
  },
  async created() {
    const res = await getFind(this.query)
    console.log(res)

    this.columns.push(res.body.area)
  }
}
</script>

<style scoped lang="less">
.icone {
  margin-right: 15px;
}
</style>
